package com.tb.fallback;

import com.tb.domain.User;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 限流不加熔断要加@Component
 */
@Component
public class OrderFallbackClass {


    public User orderFallback(@PathVariable("id") Long id, Throwable e) {
        return new User(-1L, "降级了！！！", "服务异常不可调用，稍后访问！！！");
    }
}
